package com.quwan.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.quwan.app.vo.OrderStatusDTO;
import com.quwan.entity.C2cOrder;
import org.apache.ibatis.annotations.Param;


import java.time.LocalDate;

import java.util.List;
import java.util.Map;

/**
 * @author Hayson
 * @since 2021/7/5 23:44
 */
public interface C2cOrderMapper extends BaseMapper<C2cOrder> {
    List<C2cOrder> selectOrderInfoByPublishOrderIds(@Param("ids") String ids, @Param("status") Integer status);

    Page<Map<String, Object>> selectManagerOrderList(Page<Map<String, String>> page,
                                                     @Param("orderId") String orderId,
                                                     @Param("p_member") String p_member,
                                                     @Param("c_member") String c_member,
                                                     @Param("category") String category,
                                                     @Param("address") String address,
                                                     @Param("orderStatus") String orderStatus,
                                                     @Param("beginTime") String beginTime,
                                                     @Param("endTime") String endTime,
                                                     @Param("publishBegin")  String publishBeginTime,
                                                     @Param("publishEnd")  String publishEndTime,
                                                     @Param("publishMemberId")  String publishMemberId,
                                                     @Param("consumerMemberId")  String consumerMemberId);

    Integer selectCountByPublishOrderIdAndDate(@Param("publishOrderIds") String publishOrderIds,
                                               @Param("date") LocalDate date);

    List<OrderStatusDTO> selectOrderStatusCount(String mId);

    List<OrderStatusDTO> selectPublishOrderStatusCount(String mId);

}